package dynamic.mybatisplus.core.toolkit;

import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException;
import dynamic.metadata.DTableInfo;
import dynamic.metadata.EntityClass;

public class DAsserts {

    public static void hasTable(DTableInfo tableInfo, EntityClass entityClass) {
        if (tableInfo == null) {
            throw new MybatisPlusException(String.format(
                    "mapper not find by class <%s> , add mapper and extends BaseMapper<T> or MPJBaseMapper<T>",
                    entityClass.getSimpleName()));
        }
    }
}
